﻿@model IEnumerable<GameSchool.Models.OnTheFlyModels.CourseOverviewItem>

@if (Model == null)
{
    <text>
    Þú ert ekki skráð(ur) í neitt námskeið.<br />
    Viltu ekki skrá þig? (TODO: ADD LINK)
    </text>
}
else
{
<text>
    
<table>
    <tr>
        <th>
            Námskeið
        </th>
        <th>
            Einingar
        </th>
        <th>
            Tegund þátttöku
        </th>
    </tr>

@foreach (var item in Model)
{
    <tr>
        <td>
            @Html.ActionLink(item.CourseName, "Details/"+item.CourseId, "Course")
            @Html.DisplayFor(modelItem => item.CourseName)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.CourseECTS)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.RegType)
        </td>
    </tr>
}

</table>
</text>
}